package test;

import java.util.Arrays;

public class Submit {

    public static void main(String[] args) {
        double[] temperatures = {36.8,36.3,36.4,36.5,37,39,39.5,38,37,36.5,37};
        System.out.println(Arrays.toString(solution(temperatures)));
    }

    private static int[] solution(double[] temperatures) {
        int[] res = new int[temperatures.length];
        for (int i = 0; i < temperatures.length; i++) {
            for (int j = i + 1; j < temperatures.length; j++) {
                if (temperatures[i] < temperatures[j]) {
                    res[i] = j - i;
                    break;
                }
            }
        }
        return res;
    }
}
